package leetcode.Y2024M5D27;

public class ListNode {
    int val;
    ListNode next;

    public ListNode(int val) {
        this.val = val;
        next=null;
    }

    public static ListNode createListNode(int[] vals){
        ListNode start=new ListNode(-1);
        ListNode res=start;
        for (int e : vals) {
            start.next=new ListNode(e);
            start=start.next;
        }
        return res.next;
    }
}
